import request from '@/utils/request'

export function login(username, password) {
  return request.fetchPost('/oauth/token', {
    'username': username,
    'scope': 'admin',
    'password': password
  })
}

export function getInfo(token) {
  return request.fetchGet('/user/info', { token })
}

export function logout() {
  return request.fetchPost('/user/logout', {})
}
